//
//  ZTAirButton.m
//  YSSmartHome
//
//  Created by yanghao on 2017/4/6.
//  Copyright © 2017年 yahaong. All rights reserved.
//

#import "ZTAirButton.h"
#import "YSCommon.h"

@implementation ZTAirButton

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return self;
}
- (CGRect)titleRectForContentRect:(CGRect)contentRect
{
    CGRect rect = CGRectMake(0, 0, contentRect.size.width, contentRect.size.height*0.5);
    return rect;
}

- (CGRect)imageRectForContentRect:(CGRect)contentRect
{
    CGRect rect = CGRectMake(contentRect.size.width * 0.5 - kIphoneSize_Widith(19)* 0.5, contentRect.size.height*0.5,kIphoneSize_Widith(19), kIphoneSize_Height(16));
    return rect;
}

@end
